using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Runtime.Serialization;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using System.CodeDom;

namespace MNS.Activities
{
    public partial class WriteActivity : Activity
    {
        public static readonly DependencyProperty WriteTextProperty = DependencyProperty.Register("WriteText",
            typeof(string),
            typeof(WriteActivity),
            new PropertyMetadata(new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible),
                new BrowsableAttribute(true),
                new DescriptionAttribute("InitText"),
                new CategoryAttribute("Data")));

        public string WriteText
        {
            get { return (string)base.GetValue(WriteActivity.WriteTextProperty); }
            set { base.SetValue(WriteActivity.WriteTextProperty, value); }
        }


        public WriteActivity()
	    {
            InitializeComponent();
        }

        protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
        {
            Console.WriteLine(WriteText);
            return ActivityExecutionStatus.Closed;
        }
    }
}
